$(function(){
	$(".orderTabBottom").on("click",function(){
		$(this).parent().hide();
	})
	$(".nav li").on("touchstart",function(){
		var index = $(this).index();
		var lft=(0+index)*1.875+"rem";
		$(".bottomLine").animate({
			left:lft
		},300);
		
		$(".navActive").removeClass("navActive");
		$(this).addClass("navActive");
	})
	$.loadmore.get(getData, {scroll: true});
})


window.onload=function(){
	jc();
}


/* 加载更多 */
function getData(config){ 
	config.isAjax = true;
	$.ajax({
		type : "GET",
		dataType : "json",
		url : "../../json/blog.json",
		data : {},
		success: function(reponse){
			config.isAjax = false;
			//to do something....
			$(".order").append('<p>2121</p>');
			$(".clickmore").html('加载更多');
		},
		error: function(xhr, type){
			console.log('Ajax error!');
		}
	});
}
